<template>
  <div style="min-height: 300px; border-bottom: 1px solid rgb(240, 240, 240); margin-bottom: 20px">
    <div class="list_th">
      <a-row>
        <a-col span="1" style="padding-left: 8px">
          <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange"
        /></a-col>
        <a-col v-for="(item, index) in list_th" :key="index" :span="item.span">{{ item.title }} </a-col>
      </a-row>
    </div>
    <a-empty :image="simpleImage" v-show="!pagaData.length" />
    <div class="list_li" v-for="(item, index) in pagaData" :key="index">
      <a-row class="row_head">
        <a-col span="1" style="padding-left: 8px"> <a-checkbox v-model="item.is_checked" /></a-col>
        <a-col span="23" style="display: flex; justify-content: space-between; padding-right: 20px">
          <!-- <a-icon
            :type="item.is_open_offline ? 'desktop' : 'mobile'"
            style="margin-right: 10px; color: rgb(203, 204, 206); font-size: 12px"
          /> -->

          <div>
            <a-icon
              :type="item.order_origin == 0 ? 'link' : item.order_origin == 1 ? 'alipay' : 'mobile'"
              style="margin-right: 10px; color: rgb(203, 204, 206); font-size: 12px"
            />
            <span class="order-num" @dblclick="copyText(item.order_no)">订单号：{{ item.order_no }}</span>
          </div>
          <span v-if="item.order_type == 3 && item.food_book_ext && item.food_book_ext != ''">
            {{ JSON.parse(item.food_book_ext).time }}
          </span>
          <!-- <span style="margin: 0 10px">/</span>
          下单时间：{{ item.created_at }}
          <span style="margin: 0 10px">/</span>
          支付方式：{{ item.pay_type | payTypeFormate }}
          <span style="margin: 0 10px">/</span>
          用户：{{ item.nickname }}
          <span style="margin: 0 10px" v-if="item.order_type">/</span>
          <span v-if="item.order_type">订单类型：{{ item.order_type | orderTypeFilter }}</span>
          <template v-if="item.apply_delete == 1">
            <span style="margin: 0 10px">/</span>申请取消该订单：<template v-if="item.trade_status == 1"
              >申请成功</template
            ><template v-else>申请中</template>
          </template>
          <template v-if="item.apply_delete == 1 && list_th[0].type != 'shareOrder'">
            <template v-if="item.trade_status != 1">
              <span>
                <a-popconfirm placement="left" @confirm="$emit('triggerAction', 'order_cancel_1', item, reason)">
                  <template slot="title">
                    <p>确认取消该订单吗？</p>
                    <a-input v-model="reason" placeholder="请输入取消原因" />
                  </template>
                  <a-button type="link" style="color: rgb(96, 194, 224)">同意</a-button>
                </a-popconfirm>
                <a-divider type="vertical"></a-divider>
                <a-popconfirm placement="left" @confirm="$emit('triggerAction', 'order_cancel_0', item, reason)">
                  <template slot="title">
                    <p>拒绝取消该订单吗？</p>
                    <a-input v-model="reason" placeholder="请输入取消原因" />
                  </template>
                  <a-button type="link" style="color: rgb(253, 79, 84); margin-right: 70px">拒绝</a-button>
                </a-popconfirm>
              </span>
            </template>
          </template> -->
        </a-col>
      </a-row>
      <a-row class="row_goods">
        <a-col span="1" style="padding-left: 8px">
          <a-icon
            :type="item.is_open ? 'minus' : 'plus'"
            class="plusIcon"
            @click="openItem(item)"
            v-show="item.goods_list && item.goods_list.length != 1"
          ></a-icon
        ></a-col>
        <a-col v-for="(inner, index) in list_th" :key="index" :span="inner.span">
          <!-- 产品名称 -->
          <div v-if="inner.title == '产品名称' || inner.title == '商品信息'">
            <!-- <a-row v-if="inner.type == 'refundList'" style="margin-top: 6px;">
              <a-col span="6">
                <img
                  :src="item.goods_pic || 'https://cyy-desc.oss-cn-beijing.aliyuncs.com/sp210329_163447.png'"
                  style="width: 80%; border-radius: 5px"
                />
              </a-col>
              <a-col span="18">
                <a-tooltip>
                  <template slot="title">
                    {{ item.goods_name }}
                  </template>
                  <h4 class="over_e fw_b">{{ item.goods_name }}</h4>
                </a-tooltip>
                <a-tooltip>
                  <template slot="title">
                    {{ item.attr ? item.attr.map((e) => e.attr_name).join() || '默认' : '默认' }}
                  </template>
                  <div class="over_e">
                    规格：{{ item.attr ? item.attr.map((e) => e.attr_name).join() || '默认' : '默认' }}
                  </div>
                </a-tooltip>
              </a-col>
            </a-row> -->
            <a-row
              :gutter="10"
              v-for="(el, inx) in item.is_open ? item.goods_list : [item.goods_list ? item.goods_list[0] : {}]"
              :key="inx"
              style="margin-top: 6px"
            >
              <a-col span="6">
                <img
                  :src="el.goods_pic || el.pic || 'https://cyy-desc.oss-cn-beijing.aliyuncs.com/sp210329_163447.png'"
                  style="width: 80%; border-radius: 5px"
                />
              </a-col>
              <a-col span="18">
                <a-tooltip>
                  <template slot="title">
                    {{ el.name }}
                  </template>
                  <h4 class="over_e fw_b">{{ el.name }}</h4>
                </a-tooltip>
                <a-tooltip v-if="item.order_type == 0">
                  <template slot="title">
                    {{ el.attr_list ? el.attr_list.map((e) => e.attr_name).join() || '默认' : '默认' }}
                  </template>
                  <div class="over_e">
                    规格：{{ el.attr_list ? el.attr_list.map((e) => e.attr_name).join() || '默认' : '默认' }}
                  </div>
                </a-tooltip>
                <!-- <a-tooltip v-else-if="item.order_type == 1">
                  <div class="over_e">
                    预约时间：{{item.book.date}}
                  </div>
                </a-tooltip>
                <a-tooltip v-else>
                  <div class="over_e">
                    预约时间：{{item.book.date}}
                  </div>
                </a-tooltip> -->
              </a-col>
            </a-row>
          </div>
          <!-- 单价数量 -->
          <div v-if="inner.title == '单价/数量'">
            <div
              v-for="(el, inx) in item.is_open ? item.goods_list : [item.goods_list ? item.goods_list[0] : {}]"
              :key="inx"
            >
              <div>小计：{{ el.total_price }}元</div>
              <div>数量：{{ el.num }}{{ el.unit }}</div>
            </div>
          </div>
          <!-- 运费 -->
          <div v-if="inner.title == '运费'">
            <div v-show="inner.type == 'list' || inner.type == 'offlineList'">
              <div>运费：{{ item.express_price }}元</div>
              <p style="margin-bottom: 0">使用{{ item.integral.forehead_integral }}积分</p>
              <p style="margin-bottom: 0">抵扣：{{ item.integral.forehead }}元</p>
            </div>
            <div v-show="inner.type == 'delivery'">
              <div>运费：0.45元</div>
              <div>会员折扣：9.00折</div>
            </div>
          </div>
          <!-- 订单金额 -->
          <div v-if="inner.title == '订单金额'">
            <div>总金额:{{ item.total_price }}元</div>
            <div>应付款:{{ item.pay_price }}元</div>
          </div>
          <!-- 订单状态 -->
          <div v-if="inner.title == '订单状态'">
            <div v-if="inner.type == 'refundList'">
              <template v-if="item.refund_status == 0">
                <template v-if="item.is_agree == 1">
                  <template v-if="item.is_user_send == 1">
                    用户已发货
                    <div>快递公司：{{ item.user_send_express }}</div>
                    <div>快递单号：{{ item.user_send_express_no }}</div>
                  </template>
                  <template v-else> 待用户发货 </template>
                </template>
                <template v-else> 待处理 </template>
              </template>
              <template v-else-if="item.refund_status == 1"> 已同意退款退货 </template>
              <template v-else-if="item.refund_status == 2"> 已同意换货 </template>
              <template v-else-if="item.refund_status == 3">
                {{ item.refund_type == 1 ? '已拒绝退货退款' : '已拒换货' }}
                <br />
                <div>{{ item.refund_refuse_desc }}</div>
              </template>
              <template v-if="item.pay_type == 2"> 注：货到付款方式的退款需要线下与客户自行协商 </template>
            </div>
            <div v-else class="status">
              <span :style="item | orderStatus"></span>
              <span>{{ item | orderStatusFormate }}</span>
            </div>
          </div>
          <!-- 订单来源 -->
          <div v-if="inner.title == '订单来源'">
            <div v-if="inner.type == 'refundList'">
              <template v-if="item.platform == 0"> 微信用户 </template>
              <template v-if="item.platform == 1"> 支付宝 </template>
              <template v-if="item.platform == 2"> 公众号 </template>
              <template v-if="item.platform == 3"> APP </template>
            </div>
            <div v-else>{{ item.order_origin | orderOriginFormate }}</div>
          </div>
          <!-- 退款退货/换货 -->
          <div v-if="inner.title == '收获类型'">
            <div>{{ item.refund_type == 1 ? '退款退货' : '换货' }}</div>
          </div>
          <!-- 退款金额 -->
          <div v-if="inner.title == '退款金额'">
            <div>{{ item.refund_price }}元</div>
          </div>
          <!-- 申请理由 -->
          <div v-if="inner.title == '申请理由'">
            <div>{{ item.refund_desc }}</div>
          </div>
          <!-- 实际付款 -->
          <div v-if="inner.title == '实际付款'">
            <div>1299.45元</div>
          </div>
          <!-- 发货方式 -->
          <div v-if="inner.title == '发货方式'">
            <div>快递配送</div>
          </div>
          <!-- 配送状态 -->
          <div v-if="inner.title == '配送状态'">
            <div>已配送</div>
          </div>
          <!-- 配送员 -->
          <div v-if="inner.title == '配送员'">
            <div>无</div>
          </div>
          <!-- 分销情况 -->
          <div v-if="inner.title == '分销情况'">
            <a-row v-if="item.share_1 || item.share_2 || item.share_3">
              <a-col v-if="item.share_1" :span="item.share_2 ? (item.share_3 ? 8 : 12) : 24">
                <div>
                  <div v-if="item.share_1.nickname">昵称：{{ item.share_1.nickname }}</div>
                  <div v-if="item.share_1.name">姓名：{{ item.share_1.name }}</div>
                  <div v-if="item.share_1.mobile">电话：{{ item.share_1.mobile }}</div>
                  <div>一级佣金：{{ item.first_price }}</div>
                </div>
              </a-col>
              <a-col v-if="item.share_2" :span="item.share_3 ? 8 : 12">
                <div>
                  <div v-if="item.share_2.nickname">昵称：{{ item.share_2.nickname }}</div>
                  <div v-if="item.share_2.name">姓名：{{ item.share_2.name }}</div>
                  <div v-if="item.share_2.mobile">电话：{{ item.share_2.mobile }}</div>
                  <div>二级佣金：{{ item.second_price }}</div>
                </div>
              </a-col>
              <a-col v-if="item.share_3" :span="8">
                <div>
                  <div v-if="item.share_3.nickname">昵称：{{ item.share_3.nickname }}</div>
                  <div v-if="item.share_3.name">姓名：{{ item.share_3.name }}</div>
                  <div v-if="item.share_3.mobile">电话：{{ item.share_3.mobile }}</div>
                  <div>三级佣金：{{ item.third_price }}</div>
                </div>
              </a-col>
            </a-row>
            <div v-else>
              自购返利<span style="color: red">{{ item.rebate }}</span
              >元
            </div>
          </div>
          <!-- 操作 -->
          <div v-if="inner.title == '操作'" class="row_actions">
            <div v-if="inner.type == 'refundList'">
              <template v-if="item.is_user_cancel == 0">
                <template v-if="item.refund_status == 0">
                  <template v-if="item.refund_type == 1">
                    <template v-if="item.is_agree == 1">
                      <template v-if="item.is_user_send != 1">
                        <a-button
                          type="link"
                          v-if="inner.actions.find((sm) => sm == '拒绝退货')"
                          @click="$emit('triggerAction', 'disagree_2', item)"
                        >
                          拒绝退货
                        </a-button>
                      </template>
                      <a-button
                        type="link"
                        v-if="inner.actions.find((sm) => sm == '确认收货')"
                        @click="$emit('triggerAction', 'agree_3', item)"
                      >
                        确认收货
                      </a-button>
                    </template>
                    <template v-else>
                      <a-button
                        type="link"
                        v-if="inner.actions.find((sm) => sm == '同意退货')"
                        @click="$emit('triggerAction', 'agree_2', item)"
                      >
                        同意退货
                      </a-button>
                      <a-divider type="vertical" v-if="inner.actions.find((sm) => sm == '同意退货')" />
                      <a-button
                        type="link"
                        v-if="inner.actions.find((sm) => sm == '拒绝退货')"
                        @click="$emit('triggerAction', 'disagree_2', item)"
                      >
                        拒绝退货
                      </a-button>
                    </template>
                  </template>
                  <template v-else>
                    <a-button
                      type="link"
                      v-if="inner.actions.find((sm) => sm == '同意换货')"
                      @click="$emit('triggerAction', 'agree_1', item)"
                    >
                      同意换货
                    </a-button>
                    <a-divider type="vertical" v-if="inner.actions.find((sm) => sm == '同意换货')" />
                    <a-button
                      type="link"
                      v-if="inner.actions.find((sm) => sm == '拒绝换货')"
                      @click="$emit('triggerAction', 'disagree_1', item)"
                    >
                      拒绝换货
                    </a-button>
                  </template>
                </template>
              </template>
              <template v-else> 用户取消售后申请 </template>
            </div>
            <div v-else>
              <!-- <a-button
                type="link"
                v-if="inner.actions.find((sm) => sm == '编辑')"
                @click="$emit('triggerAction', 'order_edit', item)"
              >
                详情
              </a-button>
              <a-divider type="vertical" v-if="inner.actions.length" />
              <a-dropdown v-if="inner.actions.length && item.is_trans == 0">
                <a class="ant-dropdown-link"> 更多 <a-icon type="down" /> </a>
                <a-menu slot="overlay">
                  <a-menu-item
                    v-if="
                      inner.actions.find((sm) => sm == '发货') &&
                      (item.trade_status == 0 || (item.pay_type == 2 && item.trade_status != 2)) &&
                      item.is_delete == 0 &&
                      !item.delivery_id
                    "
                  >
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_send', item)">发货</a>
                  </a-menu-item>
                  <a-menu-item
                    v-if="inner.actions.find((sm) => sm == '取消') && item.trade_status < 1 && item.is_delete == 0"
                  >
                    <a-popconfirm placement="left" @confirm="$emit('triggerAction', 'order_cancel', item, reason)">
                      <template slot="title">
                        <p>确认取消该订单吗？</p>
                        <a-input v-model="reason" placeholder="请输入取消原因" />
                      </template>
                      <a href="javascript:;"> 取消 </a>
                    </a-popconfirm>
                  </a-menu-item>
                  <a-menu-item
                    v-if="
                      inner.actions.find((sm) => sm == '核销') &&
                      (item.is_pay == 1 || item.pay_type == 2) &&
                      item.is_offline == 1 &&
                      item.trade_status < 1 &&
                      item.is_delete == 0
                    "
                  >
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_cancel_verification', item)">核销</a>
                  </a-menu-item>
                  <a-menu-item
                    v-if="inner.actions.find((sm) => sm == '确认收货') && item.pay_type == 2 && item.trade_status == 2"
                  >
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_confirm', item)">确认收货</a>
                  </a-menu-item>
                  <a-menu-item v-if="inner.actions.find((sm) => sm == '转单平台') && item.trade_status < 1">
                    <a href="javascript:;" @click="$emit('triggerAction', 'transOrder', item)">转单平台</a>
                  </a-menu-item>
                  <a-menu-item v-if="inner.actions.find((sm) => sm == '订单打印')">
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_print', item)">订单打印</a>
                  </a-menu-item>
                  <a-menu-item v-if="inner.actions.find((sm) => sm == '小票打印')">
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_receipts_print', item)">小票打印</a>
                  </a-menu-item>
                  <a-menu-item v-if="inner.actions.find((sm) => sm == '添加备注')">
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_remark', item)">添加备注</a>
                  </a-menu-item>
                  <a-menu-item v-if="inner.actions.find((sm) => sm == '移入回收站')">
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_recycle', item)">移入回收站</a>
                  </a-menu-item>
                </a-menu>
              </a-dropdown> -->
              <a-button
                type="link"
                v-if="item.apply_delete == 1 && list_th[0].type != 'shareOrder' && item.trade_status != 1"
                @click="$emit('triggerAction', 'order_cancel_1', item, '')"
                :disabled="item.is_trans == 1"
              >
                同意取消
              </a-button>
              <a-button
                type="link"
                v-if="item.apply_delete == 1 && list_th[0].type != 'shareOrder' && item.trade_status != 1"
                @click="$emit('triggerAction', 'order_cancel_0', item, '')"
                :disabled="item.is_trans == 1"
              >
                <a-divider type="vertical" />
                拒绝取消
              </a-button>
              <a-button
                type="link"
                v-if="
                  inner.actions.find((sm) => sm == '发货') &&
                  item.apply_delete != 1 &&
                  (item.trade_status == 0 || (item.pay_type == 2 && item.trade_status == 0)) &&
                  item.is_delete == 0 &&
                  item.is_offline == 1 &&
                  !item.delivery_id &&
                  item.md_info.is_single == 1
                "
                @click="$emit('triggerAction', 'order_send', item)"
                :disabled="item.is_trans == 1 || item.order_type == 3"
              >
                发货
              </a-button>

              <template v-if="inner.actions.find((sm) => sm == '改价') && item.is_pay === '0'">
                <a-button type="link" @click="$emit('triggerAction', 'change_price', item)"> 改价 </a-button>
                <a-divider type="vertical" />
              </template>
              <a-button
                type="link"
                v-if="
                  inner.actions.find((sm) => sm == '核销') &&
                  (item.is_pay == 1 || item.pay_type == 2) &&
                  item.apply_delete != 1 &&
                  item.is_offline == 1 &&
                  item.trade_status == 2 &&
                  item.is_delete == 0
                "
                @click="$emit('triggerAction', 'order_cancel_verification', item)"
                :disabled="item.is_trans == 1 || item.clerk_id > 0"
              >
                核销
              </a-button>
              <a-button
                type="link"
                v-if="inner.actions.find((sm) => sm == '确认收货') && item.pay_type == 2 && item.trade_status == 2"
                @click="$emit('triggerAction', 'order_confirm', item)"
                :disabled="item.is_trans == 1"
              >
                收货
              </a-button>
              <a-button
                type="link"
                v-if="inner.actions.find((sm) => sm == '编辑') && item.trade_status != 0 && item.trade_status != 2"
                @click="$emit('triggerAction', 'order_edit', item)"
              >
                详情
              </a-button>
              <a-divider type="vertical" />
              <a-dropdown v-if="inner.actions.length" :disabled="item.is_trans == 1">
                <a-button type="link"> 更多 <a-icon type="down" /> </a-button>
                <a-menu slot="overlay">
                  <a-menu-item
                    v-if="
                      inner.actions.find((sm) => sm == '发货') &&
                      item.apply_delete == 1 &&
                      (item.trade_status == 0 || (item.pay_type == 2 && item.trade_status == 0)) &&
                      item.is_offline != 1 &&
                      item.is_delete == 0 &&
                      !item.delivery_id
                    "
                    :disabled="item.is_trans == 1 || item.order_type == 3"
                  >
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_send', item)"> 发货 </a>
                  </a-menu-item>
                  <a-menu-item
                    type="link"
                    v-if="
                      inner.actions.find((sm) => sm == '核销') &&
                      (item.is_pay == 1 || item.pay_type == 2) &&
                      item.apply_delete == 1 &&
                      item.is_offline == 1 &&
                      item.trade_status < 1 &&
                      item.is_delete == 0
                    "
                    :disabled="item.is_trans == 1 || item.clerk_id > 0"
                  >
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_cancel_verification', item)"> 核销 </a>
                  </a-menu-item>
                  <a-menu-item
                    v-if="inner.actions.find((sm) => sm == '取消') && item.trade_status < 1 && item.is_delete == 0"
                  >
                    <a-popconfirm placement="left" @confirm="$emit('triggerAction', 'order_cancel', item, reason)">
                      <template slot="title">
                        <p>确认取消该订单吗？</p>
                        <a-input v-model="reason" placeholder="请输入取消原因" />
                      </template>
                      <a href="javascript:;"> 取消 </a>
                    </a-popconfirm>
                  </a-menu-item>
                  <a-menu-item
                    v-if="
                      (inner.actions.find((sm) => sm == '编辑') && item.trade_status == 0) || item.trade_status == 2
                    "
                  >
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_edit', item)"> 详情 </a>
                  </a-menu-item>
                  <a-menu-item
                    v-if="inner.actions.find((sm) => sm == '转单平台') && item.trade_status < 1 && item.order_type != 3"
                  >
                    <a href="javascript:;" @click="$emit('triggerAction', 'transOrder', item)">转单平台</a>
                  </a-menu-item>
                  <a-menu-item v-if="inner.actions.find((sm) => sm == '订单打印')">
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_print', item)">订单打印</a>
                  </a-menu-item>
                  <a-menu-item v-if="inner.actions.find((sm) => sm == '小票打印')">
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_receipts_print', item)">小票打印</a>
                  </a-menu-item>
                  <a-menu-item v-if="inner.actions.find((sm) => sm == '添加备注')">
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_remark', item)">添加备注</a>
                  </a-menu-item>
                  <a-menu-item v-if="inner.actions.find((sm) => sm == '移入回收站')">
                    <a href="javascript:;" @click="$emit('triggerAction', 'order_recycle', item)">移入回收站</a>
                  </a-menu-item>
                </a-menu>
              </a-dropdown>
            </div>
            <a-tag color="green" v-if="item.is_trans == 1"> 已转单 </a-tag>
          </div>
          <!-- 买家/收货人 -->
          <div v-if="inner.title == '买家/收货人'">
            <a-tooltip
              v-for="(el, inx) in item.is_open ? item.goods_list : [item.goods_list ? item.goods_list[0] : {}]"
              :key="inx"
            >
              <template slot="title">
                <div class="addressInfo">
                  <span>姓名:{{ item.user_name }}</span>
                  <span>手机:{{ item.mobile }}</span>
                  <span>地址:{{ item.user_address }}</span>
                  <span v-if="item.order_type == 3">取餐码:{{ item.food_code }}</span>
                </div>
              </template>
              <div class="delivery_type">
                <span>{{ item.user_name }}</span>
                <span>{{ el.delivery_type == 0 ? '快递配送' : el.delivery_type == 1 ? '商店自提' : '同城配送' }}</span>
              </div>
            </a-tooltip>
          </div>
          <!-- 取餐码 -->
          <div v-if="inner.title == '取餐号'">
            <span>{{ item.food_code }}</span>
          </div>
          <!-- 下单门店/时间 -->
          <div v-if="inner.title == '下单门店/时间'">
            <div v-if="item.md_info">
              <a-tooltip
                overlayClassName="draw_overlay"
                :overlayStyle="{
                  width: '250px',
                }"
              >
                <template slot="title">
                  <div class="addressInfo">
                    <div>
                      <h3>门店信息</h3>
                      <h4>名称：{{ item.md_info.name }}</h4>
                      <h4>地址：{{ item.md_info.address }}</h4>
                      <h4>联系电话：{{ item.md_info.mobile }}</h4>
                      <h4>营业状态：{{ mdTimeStatus(item.md_info) }}</h4>
                      <h4>营业时间：{{ mdTime(item.md_info) }}</h4>
                    </div>
                  </div>
                </template>
                <div class="md_info">
                  <span>{{ item.md_info.name }}</span>
                  <span>{{ item.created_at }}</span>
                </div>
              </a-tooltip>
            </div>
            <span v-else>/</span>
          </div>
        </a-col>
      </a-row>
      <!-- <a-row
        class="row_footer"
        :style="(item.seller_comments||item.remark)?{lineHeight:'30px'}:{}"
        v-if="(list_th[0].type == 'offlineList' && item.shop) || (list_th[0].type == 'shareOrder' && item.shop)"
      >
        <a-col span="20" :offset="1">
          联系人：{{ item.nickname }}<span style="margin: 0 10px">/</span>联系电话：{{ item.mobile
          }}<span style="margin: 0 10px">/</span>核销员：{{ item.clerk_name
          }}<span style="margin: 0 10px">/</span>门店名称：{{ item.shop.name
          }}<span style="margin: 0 10px">/</span>门店地址：{{ item.shop.address
          }}<span style="margin: 0 10px">/</span>电话：{{ item.shop.mobile }}</br>
          <template v-if="item.seller_comments">
            <span></span>商家备注：{{ item.seller_comments }}
          </template>
          <template v-if="item.remark">
            <span style="margin: 0 10px">/</span>买家留言：{{ item.remark }}
          </template>
        </a-col>
        <a-col span="3">
          <a-button
            type="link"
            @click="$emit('triggerAction', 'update_shop', item)"
            v-if="list_th[0].type != 'shareOrder'"
            >[修改自提点]</a-button
          >
        </a-col>
      </a-row>
      <a-row class="row_footer" v-else :style="(item.seller_comments||item.remark)?{lineHeight:'30px'}:{}">
        <a-col span="20" :offset="1">
          收货人：{{ item.name }}<span style="margin: 0 10px">/</span>电话：{{ item.mobile
          }}<span style="margin: 0 10px">/</span>地址：<span v-if="item.address_data"
            >{{ item.address_data.province || item.address }}{{ item.address_data.city }}{{ item.address_data.district
            }}{{ item.address_data.detail }}</span
          >
          <template v-if="item.seller_comments">
            <span style="margin: 0 10px">/</span>商家备注：{{ item.seller_comments }}
          </template>
          <template v-if="item.remark">
            <span style="margin: 0 10px">/</span>买家留言：{{ item.remark }}
          </template>
        </a-col>
        <a-col span="3" v-if="list_th[0].type != 'refundList' && list_th[0].type != 'shareOrder'">
          <a-button type="link" @click="$emit('triggerAction', 'order_address', item)">[修改地址]</a-button>
        </a-col>
      </a-row> -->
    </div>
  </div>
</template>

<script>
import { Empty } from 'ant-design-vue'
export default {
  props: {
    list_th: {
      type: Array,
      default: () => [],
    },
    pagaData: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      reason: '',
    }
  },
  filters: {
    orderTypeFilter(val) {
      switch (val) {
        case '0':
          return '商城订单'
        case '1':
          return '酒店预约'
        case '2':
          return '服务预约'
        default:
          return ''
      }
    },
    orderStatusFormate(val) {
      if (val.is_pay == 0) {
        return '未支付'
      }
      if (val.is_pay == 1 && val.trade_status == 0) {
        return '待发货'
      }
      if (val.is_pay == 1 && val.trade_status == 2) {
        return '待收货'
      }
      if (val.is_pay == 1 && val.trade_status == 3) {
        return '已完成'
      }
    },
    payTypeFormate(val) {
      switch (val) {
        case '1':
          return '微信支付'
        case '2':
          return '货到付款'
        case '3':
          return '余额'
        case '4':
          return '支付宝'
        default:
          return '未支付'
      }
    },
    orderStatus(val) {
      if (val.is_pay == 0) {
        return 'background-color:#c6c6c6;'
      }
      if (val.is_pay == 1 && val.trade_status == 0) {
        return 'background-color:#faad14'
      }
      if (val.is_pay == 1 && val.trade_status == 2) {
        return 'background-color:#1890ff'
      }
      if (val.is_pay == 1 && val.trade_status == 3) {
        return 'background-color:#65c817'
      }
    },
    orderOriginFormate(val) {
      switch (val) {
        case '1':
          return '公众号或网络'
        case '2':
          return 'app'
        case '3':
          return '小程序'
        default:
          return ''
      }
    },
  },
  computed: {
    mdTimeStatus() {
      return (md) => {
        console.log(md)
        if (parseInt(md.open_status) === 1) {
          return '营业'
        }
        return '打烊'
      }
    },
    mdTime() {
      return (md) => {
        if (parseInt(md.shop_time_type) === 1) {
          return md.start_time + ' - ' + md.end_time
        }
        return '全天营业'
      }
    },
    indeterminate() {
      let len = this.pagaData.filter((item) => item.is_checked).length
      if (len && len != this.pagaData.length) {
        return true
      } else {
        return false
      }
    },
    checkAll() {
      let len = this.pagaData.filter((item) => item.is_checked).length
      if (len == this.pagaData.length && this.pagaData.length != 0) {
        return true
      } else {
        return false
      }
    },
  },
  watch: {},
  beforeCreate() {
    this.simpleImage = Empty.PRESENTED_IMAGE_SIMPLE
  },
  created() {},
  mounted() {},
  updated() {},
  methods: {
    onCheckAllChange(e) {
      let len = this.pagaData.filter((item) => item.is_checked).length
      if (len != this.pagaData.length) {
        this.pagaData.forEach((el) => {
          this.$set(el, 'is_checked', true)
        })
      } else {
        this.pagaData.forEach((el) => {
          this.$set(el, 'is_checked', false)
        })
      }
    },
    openItem(item) {
      if (typeof item.is_open == 'undefined') {
        this.$set(item, 'is_open', true)
        return
      }
      this.$set(item, 'is_open', !item.is_open)
    },
    copyText(data) {
      if (!data) return
      this.$copyText(data)
        .then((e) => {
          this.$message.success('复制成功')
        })
        .catch((err) => {
          console.log(err)
          this.$message.error('复制失败')
        })
    },
  },
}
</script>
<style>
.draw_overlay .ant-tooltip-inner {
  color: #333 !important;
  background-color: #fff !important;
}
.draw_overlay .ant-tooltip-arrow::before {
  background-color: #fff;
}
</style>
<style scoped lang="less">
.plusIcon {
  cursor: pointer;
  transition: all 0.5s;
  &:hover {
    color: rgb(24, 144, 255);
  }
}
.fw_b {
  font-weight: bold;
}
.row_footer {
  border-top: 1px solid rgb(240, 240, 240);
  color: rgba(143, 143, 143);
  line-height: 50px;
}
.row_actions {
  /deep/.ant-btn {
    padding: 0;
  }
}
.list_li {
  /deep/.ant-row {
    display: flex;
    align-items: center;
  }
  .row_goods {
    transition: all 0.5s;
  }
  .row_footer {
    transition: all 0.5s;
  }
  &:hover {
    .row_head {
      background: rgb(230, 247, 255);
    }
    .row_goods {
      background: rgb(230, 247, 255);
    }
    .row_footer {
      background: rgb(230, 247, 255);
    }
  }
}
.list_li:hover {
  background: rgb(230, 247, 255);
}
.row_goods {
  padding: 15px 0;
}
.over_e {
  width: 80%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.list_th {
  background: rgb(250, 250, 250);
  height: 50px;
  line-height: 50px;
  color: black;
}
.row_head {
  background: rgb(250, 251, 253);
  border-top: 1px solid rgb(240, 240, 240);
  padding: 10px 0;
  color: rgba(143, 143, 143);

  .order-num {
    user-select: none;
  }
}
.delivery_type {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
  margin: 5px 0;
}
.addressInfo {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: #fff;
}
.md_info {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.45);
  span {
    margin: 5px 0;
  }
}
.status {
  display: flex;
  align-items: center;
  span:nth-child(1) {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
  }
}
</style>
